home *** CD-ROM | disk | FTP | other *** search
Wrap
wwwwaaaavvvveeee((((4444)))) wwwwaaaavvvveeee((((4444)))) NNNNAAAAMMMMEEEE wave, riff - Microsoft RIFF WAVE file format SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>> DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN The Audio File Library currently supports 13 of the commonly found audio file formats, i.e., is able to recognize, read, and write sample data and header information to and from files in these formats. It is important not to confuse _s_a_m_p_l_e or _a_u_d_i_o _d_a_t_a _f_o_r_m_a_t_s with _f_i_l_e _f_o_r_m_a_t_s. The former refers to the bit-wise organization of the sound samples in the file, i.e., whether the format is 8-bit integer or 16-bit unsigned, etc. Audio file format refers to the structure of the _a_u_d_i_o _f_i_l_e _h_e_a_d_e_r, the chunk of on-disk data which preceeds the samples and which provides information about the file to the audio program. A single audio file format may support a large variety of sample formats. The MMMMiiiiccccrrrroooossssoooofffftttt RRRRIIIIFFFFFFFF WWWWAAAAVVVVEEEE FFFFiiiilllleeee FFFFoooorrrrmmmmaaaatttt ((((wwwwaaaavvvveeee)))) was created by Microsoft, Inc., as an analog to the AAAAIIIIFFFFFFFF(4) file format. It consists of a variable-length header followed by a contiguous block of binary data representing the sound samples. Occasionally, additional chunks of non- audio information will be placed after the sound sample block. DDDDAAAATTTTAAAA FFFFOOOORRRRMMMMAAAATTTT SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNNSSSS SSSSaaaammmmpppplllleeee FFFFoooorrrrmmmmaaaattttssss:::: Two's complement integer for 9-bit and greater sample widths, unsigned for 8-bit and smaller sample widths. SSSSaaaammmmpppplllleeee WWWWiiiiddddtttthhhhssss:::: From 1 to 32 bits, inclusive BBBByyyytttteeee OOOOrrrrddddeeeerrrrssss:::: Always littleendian (only applies to 9-bit and greater widths) CCCChhhhaaaannnnnnnneeeellll CCCCoooouuuunnnnttttssss:::: Any positive nonzero number, 1 and 2 most common CCCCoooommmmpppprrrreeeessssssssiiiioooonnnn FFFFoooorrrrmmmmaaaattttssss:::: U-Law (AF_COMPRESSION_G711_ULAW) A-Law (AF_COMPRESSION_G711_ALAW) IMA ADPCM (AF_COMPRESSION_DVI_AUDIO) Note that WAVE ADPCM compression is not currently supported by the Audio File Library. FFFFIIIILLLLEEEE FFFFOOOORRRRMMMMAAAATTTT SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNNSSSS WAVE file headers can contain large amounts of additional information. PPPPaaaaggggeeee 1111 wwwwaaaavvvveeee((((4444)))) wwwwaaaavvvveeee((((4444)))) IIIInnnnssssttttrrrruuuummmmeeeennnntttt CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnnssss:::: Maximum of 1 allowed. Any number of loops per inst. Inst is stored in a WAVE 'playlist' containing an arbitrary number of sound segments to be played and repeated. As in an AAAAIIIIFFFFFFFF(4) file, each loop contains a reference to a marker (one in the case of WAVE rather than two as in AIFF). Markers are known as 'cue's. A loop is stored as a reference to a starting cue, a length in samples, plus a loop count (retrievable via aaaaffffGGGGeeeettttLLLLooooooooppppCCCCoooouuuunnnntttt(3dm)). Instparams associated with this inst: AF_INST_MIDI_BASENOTE AF_INST_NUMCENTS_DETUNE AF_INST_MIDI_LONOTE AF_INST_MIDI_HINOTE AF_INST_MIDI_LOVELOCITY AF_INST_MIDI_HIVELOCITY AF_INST_NUMDBS_GAIN MMMMaaaarrrrkkkkeeeerrrrssss:::: Any number of markers (known as 'cues' in WAVE file format) is allowed. There must be at least one marker if there are loops present in the file. There may be any number of "independent" markers (not associated with loops) plus those needed to define the starting positions of the loops present (see aaaaffffSSSSeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(3dm) and related pages for further information). In addition, it is possible to associate both a name string and a comment string with each marker. The routines aaaaffffIIIInnnniiiittttMMMMaaaarrrrkkkkNNNNaaaammmmeeee(3dm) and aaaaffffIIIInnnniiiittttMMMMaaaarrrrkkkkCCCCoooommmmmmmmeeeennnntttt(3dm) will do this. MMMMiiiisssscccceeeellllllllaaaannnneeeeoooouuuussss CCCChhhhuuuunnnnkkkkssss:::: AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOPPPPYYYY copyright string AAAAFFFF____MMMMIIIISSSSCCCC____AAAAUUUUTTTTHHHH author string AAAAFFFF____MMMMIIIISSSSCCCC____NNNNAAAAMMMMEEEE name string AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOMMMMMMMMEEEENNNNTTTT text comment string AAAAFFFF____MMMMIIIISSSSCCCC____IIIICCCCRRRRDDDD creation date string AAAAFFFF____MMMMIIIISSSSCCCC____IIIISSSSFFFFTTTT software name string SSSSEEEEEEEE AAAALLLLSSSSOOOO afInitFileFormat(3dm), afGetFileFormat(3dm), afIntro(3dm), afInitCompression(3dm), afGetCompression(3dm), afSetLoopStart(3dm), afSetLoopEnd(3dm) PPPPaaaaggggeeee 2222